package com.bw.task;

import com.bw.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author bobo棒
 * @date 2024年07月09日 11:00
 */

@Configuration
public class Task2 {
    @Autowired
    ChannelService channelService;

    /**
     * 每价格1分钟执行更新点赞数据
     */
    @Scheduled(fixedDelay = 1000 * 60)
    public void taskUp(){
      int i =  channelService.updateDBFromRedis();
      System.out.println("更新成功"+i);
    }
}
